import request from "@/utils/request";
import { LoginData, LoginResult } from "./model";

class AuthAPI {
  /**
   * 登录API
   *
   * @param data {LoginData}
   * @returns
   */
  static login(data: LoginData) {
    // const formData = new FormData();
    // formData.append("username", data.username);
    // formData.append("password", data.password);
    return request<any, LoginResult>({
      url: "/admin/login",
      method: "post",
      data,
    });
  }
}

export default AuthAPI;
